var historyColModel = new Ext.grid.ColumnModel([
	new Ext.grid.RowNumberer({header: '序号', width: 35}), //加入序号
	{header: '同意/驳回', width: 100, dataIndex: 'approveType', sortable: true},
	{header: '审批人', width: 100, dataIndex: 'approver', sortable: true},
	{header: '审批意见', width: 100, dataIndex: 'desc', sortable: true},
	{header: '审批时间', width: 100, dataIndex: 'approveTime', sortable: true}
]);

var historyStore = new Ext.data.JsonStore({
	url: '../approve_new/history.action',
	fields: ['desc', 'approveTime', 'approver','approveType']
});

var historyGrid = new Ext.grid.GridPanel({
	height: 200,
	autoWidth: true, 
	viewConfig: new Ext.grid.GridView({
		autoFill: true  
	}),
	stripeRows: true, 
	frame: true, 
	store: historyStore,
	cm: historyColModel
});
var historyWin = new Ext.Window({
		width: 600,
//		height: 300,
		items: [historyGrid],
		modal: true, //模态
		resizable: true, //禁制调整窗口大小
		
		closeAction: 'hide' //不销毁form对象，只是隐藏
	});



function viewHistory(billId){
	if(isBlank(billId)){
		alert("billId不能为空");
		return;
	}
	historyWin.setTitle("审批历史记录");
	historyWin.show();
	historyStore.load({
		params:{"approveInfo1.perReq._id":billId}
	});	
}


